<template>
  <div class="main">
    <el-table :data="tableData" stripe style="width: 100%" @row-click="rowClick" size="small">
      <el-table-column align="center" label="序号" width="80">
        <template v-slot="scope">
          {{ (pageInfo.page - 1) * 10 + scope.$index + 1 }}
        </template>
      </el-table-column>
      <el-table-column prop="WONUM" label="工单编号" width="100" />
      <el-table-column prop="CUBUGTP" label="缺陷类型" />
      <el-table-column prop="STATUS" label="状态" width="100" />
      <el-table-column prop="REPORTDATE" label="登记时间" />
      <el-table-column prop="DESCRIPTION" label="缺陷描述" />
      <el-table-column prop="CREWID" label="班组" />
      <el-table-column prop="CUSPEC" label="专业" />
      <el-table-column prop="CUUNIT" label="机组" />
      <el-table-column prop="CUSTWAITDES" label="待处理原因" />
      <el-table-column prop="STATUSDATE" label="更新时间" />
    </el-table>
  </div>
</template>
<script>
import sppApi from '@/api/spp'
export default {
  name: 'LimList',
  props: {
    ticketSta: {
      type: String,
      default: '0'
    }
  },
  watch: {
    ticketSta(newValue) {
      Object.assign(this.pageInfo, newValue)
    }
  },
  data() {
    return {
      tableData: [],
      total: 0,
      pageInfo: { page: 1, ticketSta: '0' },
      dialogTableVisible: false,
      plateNo: '',
      crossDate: '',
      dialogTitle: '人员轨迹信息'
    }
  },
  mounted() {
    this.initLoadData()
  },
  methods: {
    initLoadData() {
      sppApi.getLimListBySta().then((res) => {
        if (res.code === 200) {
          this.tableData = res.data
        }
      })
    }
  }
}
</script>
